package com.ys.controller.web.sys;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ys.controller.api.sys.ApiInterYsIconController;
import com.ys.entity.sys.YsIcon;
import com.ys.service.sys.CommonApiService;

/**
 * 
 * @author Jason
 *
 */
@Controller
@RequestMapping("/web/sys/ysIcon")
public class WebYsIconController {
	
	@Autowired
	private CommonApiService<YsIcon> commonApiService;

	
	/**
	 * 新增
	 * @throws Exception 
	 */
	@GetMapping("/toAdd")
	public String toAdd(Model model) throws Exception{
		
		return commonApiService.toAdd(model, new YsIcon(), ApiInterYsIconController.MENU_ID, null, null);
	}
	
	/*
	 * 批量导入
	 */
	@RequiresPermissions("ysIcon:batchImport")
	@GetMapping("/toBatchImport")
	public String toBatchImport(){

		return "sys/ysIcon/toBatchImport";
	}
}
